#include <glib.h>

void show(GArray *a)
{
	int tmp = 0;
	while(a->len) {
		tmp = g_array_index(a, int, 0);
		g_message("tmp(%d)", tmp);
		g_array_remove_index(a, 0);
	}
}

int main(int argc,char *argv[])
{
	GArray *array = NULL;
	gint i=0;

	array = g_array_new(FALSE, TRUE, sizeof(int));

	for ( i = 0; i < 6; i++) {
		g_array_append_val(array, i);
	}

	g_message("len:%d", array->len);
	show(array);

	g_array_free(array, TRUE);

	return 0;
} 
